Function Import-ISEOptions
{
    [CmdletBinding()]
    Param()
    
    Process
    {
        $private:OpenFileDialog = New-Object System.Windows.Forms.OpenFileDialog
        $OpenFileDialog.Title = "Import ISE Options from File"
        $OpenFileDialog.Filter = "XML files (*.xml)|*.xml|All files (*.*)|*.*"
        $private:DialogResult = $OpenFileDialog.ShowDialog()
        
        If ($DialogResult -Eq [System.Windows.Forms.DialogResult]::OK)
        {
            $private:FileName = $OpenFileDialog.FileName
            $private:Xml = [Xml](Get-Content $FileName)
            $private:Text = Get-VariableText "`$psISE.Options" $psISE.Options $Xml
            Save-ISEOptionsAs $Text
        }
    }
}

Export-ModuleMember Import-ISEOptions
